<template>
  <el-menu
      default-active="1"
      class="el-menu-vertical-demo"
      :mode="verticalMode"
      :unique-opened="isUniqueOpened"
      :default-openeds="openeds"
      :collapse-transition="isCollapseTransition"
      :collapse="isCollapse"
      @open="handleOpen"
      @close="handleClose" style="height: 100%">
    <el-submenu index="1">
      <template slot="title">
        <i class="el-icon-postcard"></i>
        <span>账户管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="1-1" @click="open('PersonInfoPage')">个人首页</el-menu-item>
        <el-menu-item index="1-2" @click="open('ModifyPassword')">密码管理</el-menu-item>
        <el-menu-item index="1-3" @click="open('BindAccount')">账号绑定</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="2">
      <template slot="title">
        <i class="el-icon-menu"></i>
        <span>简历管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="2-1">我的简历</el-menu-item>
        <el-menu-item index="2-2">隐私设置</el-menu-item>
      </el-menu-item-group>
    </el-submenu>
    <el-submenu index="3">
      <template slot="title">
        <i class="el-icon-document"></i>
        <span>求职管理</span>
      </template>
      <el-menu-item-group>
        <el-menu-item index="3-1">被邀请的面试记录</el-menu-item>
        <el-menu-item index="3-2">简历浏览记录</el-menu-item>
        <el-menu-item index="3-3">职位申请记录</el-menu-item>
        <el-menu-item index="3-4">职位收藏记录</el-menu-item>
        <el-menu-item index="3-5">关注企业</el-menu-item>
      </el-menu-item-group>
    </el-submenu>

  </el-menu>
</template>

<script>
export default {
  name: "PersonMenu",
  data(){
    return {
      isCollapse: false,
      isCollapseTransition:false,
      isUniqueOpened: false,
      verticalMode:'vertical',
      openeds:['1','2','3'],
      PersonInfoPage:'PersonInfoPage',
      ModifyPassword:'ModifyPassword'
    }
  },
  methods:{
    handleOpen(key, keyPath){
      console.log(key, keyPath);
    },
    handleClose(key, keyPath){
      console.log(key, keyPath);
    },
    open(url){
      this.$router.push(url);
    }
  }
}
</script>

<style scoped>

</style>